// 轮播图相关的类型定义

export interface CreateBannerRequest {
  title: string;
  image: string;
  linkUrl?: string;
  sortOrder?: number;
  position?: 1 | 2;
  startTime: string;
  endTime: string;
  status?: 0 | 1;
}

export interface UpdateBannerRequest {
  title?: string;
  image?: string;
  linkUrl?: string;
  sortOrder?: number;
  position?: 1 | 2;
  startTime?: string;
  endTime?: string;
  status?: 0 | 1;
}

export interface BannerQueryParams {
  page?: number;
  limit?: number;
  keyword?: string;
  position?: 1 | 2;
  status?: 0 | 1;
  startDate?: string;
  endDate?: string;
  sortBy?: 'id' | 'title' | 'position' | 'sortOrder' | 'startTime' | 'endTime' | 'createdAt';
  sortOrder?: 'ASC' | 'DESC';
}

export interface BannerResponse {
  id: number;
  title: string;
  image: string;
  linkUrl?: string;
  sortOrder: number;
  position: 1 | 2;
  positionText: string;
  startTime: string;
  endTime: string;
  status: 0 | 1;
  statusText: string;
  isActive: boolean;
  createdAt: string;
  updatedAt: string;
}

export interface BannerListResponse {
  banners: BannerResponse[];
  total: number;
  page: number;
  limit: number;
  totalPages: number;
}

export interface BannerStatsResponse {
  total: number;
  active: number;
  inactive: number;
  expired: number;
  upcoming: number;
  byPosition: {
    [key: number]: number;
  };
}

// 前端轮播图显示接口
export interface PublicBannerResponse {
  id: number;
  title: string;
  image: string;
  linkUrl?: string;
  sortOrder: number;
  position: 1 | 2;
}

export interface PublicBannerListResponse {
  banners: PublicBannerResponse[];
  position: 1 | 2;
}